<template>
  <div class="dau">
    <h1>我是闺女曹杰{{ money }}</h1>
    <button @click="handler($parent)">点击我爸爸给我1000元</button>
  </div>
</template>

<script setup lang="ts">
import { ref } from "vue";
// 闺女钱数
let money = ref(999999);
const handler = ($parent) => {
  money.value+=1000
  $parent.money-=1000
};
</script>
<style scoped lang="less">
.dau {
  width: 300px;
  height: 300px;
  background: hotpink;
}
</style>